package com.three.vip.config;


import feign.Logger;
import feign.Request;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
@Configuration
public class FeignConfig {
    @Bean
    public Request.Options options() {
        // 设置连接和读取超时时间，例如：5秒和5秒
        return new Request.Options(5000, 5000);
    }
 
    @Bean
    public Logger.Level feignLoggerLevel() {
        // 设置Feign的日志级别，例如：FULL以查看详细的请求和响应信息
        return Logger.Level.FULL;
    }
    
    @Bean
    public FeignAuthRequestInterceptor requestInterceptor() {
        return new FeignAuthRequestInterceptor(); // 注册拦截器Bean
    }
}